package pl.taskman.controller.integration;

import java.util.List;

import pl.taskman.model.NoteDTO;
import pl.taskman.model.UserDTO;

/**
 * Class handling synchronization with online database
 * @author RegO [rego87@gmail.com]
 * @since 2011-02-07
 */
public class IntegrationController
{	
	public static final int TEST_UID = -1;
	public static final String TEST_SCREEN_NAME = "Uzytkownik";
	
	
	/**
	 * Authenticates user with given data
	 * @param login user's login
	 * @param pass user's password
	 * @return null if authentication failed, user context ({@link UserDTO}) if succeeded
	 */
	public static UserDTO authenticate(String login, String pass)
	{
		UserDTO context = new UserDTO();
		
		// TODO: implement authentication
		context.setUid(TEST_UID);
		context.setScreenName(TEST_SCREEN_NAME);
		
		return context;
	}
	
	/**
	 * Gets user's notes from database
	 * @param context user context
	 * @return list of user's notes
	 */
	public List<NoteDTO> getNotes(UserDTO context)
	{
		//TODO: implement getting notes
		return null;
	}
}
